FROM        centos:centos6
MAINTAINER  benson
#ENV         LANG C.UTF-8
RUN        yum -y install wget 
RUN       cd /etc/yum.repos.d 
RUN       rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm 
RUN       yum -y update
RUN       yum -y install mysql-server mysql mysql-devel 
RUN       yum -y install patch which 
#RUN      yum -y install php54w-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc 
RUN       yum -y install php54w 
RUN       yum -y install bc 
RUN       yum -y install php54w-mysql php54w-common php54w-mcrypt 
#RUN      yum -y install php-pear php-devel httpd-devel pcre-devel gcc make
RUN       yum -y install yum-plugin-replace php54w-pecl-apc php54w-pecl-zendopcache 
RUN       rm -rf /var/cache/yum/* && yum clean all 
RUN sed -i -e 's~^;date.timezone =$~date.timezone = Asia/Shanghai~g' /etc/php.ini
#pecl install apc uploadprogress && \
#echo "extension=apc.so" > /etc/php.d/apc.ini && \
#echo "extension=uploadprogress.so" > /etc/php.d/uploadprogress.ini && \
ADD         image-common /tmp/dexec/image-common
VOLUME      /tmp/dexec/build
ENTRYPOINT  ["/tmp/dexec/image-common/dexec-script.sh", "php"]